package com.idanchuang.component.logback;

import com.idanchuang.component.logback.config.LogbackSentryConfig;
import com.idanchuang.component.logback.runner.InitSentryRunner;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author yjy
 * @date 2019/12/31 15:14
 **/
@Configuration
@ConditionalOnProperty(prefix = "idanchuang.component.logback.sentry", value = "enabled", matchIfMissing = false)
public class ComponentLogbackSentryAutoConfiguration {

    @Bean
    public InitSentryRunner initSentryRunner(LogbackSentryConfig config) {
        return new InitSentryRunner(config);
    }

}
